package com.nassir.excel.model;


import java.util.List;
import java.io.File;

/**
 * 
 * @author zhangqiulong
 *
 */
public class ExcelModel {
	private File file; //配置文件名称
	private String fileName; // 配置文件中对应的<file>是标签的name
	private List<SheetModel> sheetModels;
	
	public ExcelModel(List<SheetModel> sheetData) {
		this.sheetModels=sheetData;
		
	}
	
    public ExcelModel(File file, String fileName, List<SheetModel> sheetData) {
    	this.fileName=fileName;
    	this.sheetModels=sheetData;
    	this.file=file;
    	
	}
	
	public File getFile() {
		return file;
	}
	public void setFile(File file) {
		this.file = file;
	}
	public String getFileName() {
		return fileName;
	}
	public void setFileName(String fileName) {
		this.fileName = fileName;
	}
	public List<SheetModel> getSheetModels() {
		return sheetModels;
	}
	public void setSheetModels(List<SheetModel> sheetModels) {
		this.sheetModels = sheetModels;
	}
	
	public SheetModel getSheetModel(String sheetName)
	{
		
		SheetModel s=new SheetModel();
		for(SheetModel sheetModel:this.getSheetModels())
		{
			if(sheetModel.getSheetName().equals(sheetName))
			{
				s=sheetModel;
				break;
			}
			
		}
		return s;

		
	}
	
	
	


}
